package com.mazaiting.course.exception;

/***
 * 自定义异常
 * @author danghailiang
 * @datetime 2022/3/8
 */
public enum ExceptionEnum {

    SUCCESS(1,"处理成功"),
    ERROR(-1,"服务器内部错误"),

    LOGIN_SUCCESS(101,"登录成功"),
    REGISTER_SUCCESS(102,"注册成功"),
    LOGIN_ERROR(-102,"用户名或者密码错误"),
    LOGIN_NULL(-103,"用户名不能为空"),
    PASSWORD_NULL(-104,"密码不能为空"),
    USERNAME_REPETITION(-105,"用户已经存在"),
    REGISTER_EXCEPTION(-106,"用户注册失败，请检查用户名或密码"),
    PARAM_ILLEGA(-107,"非法入参,请核对！！！"),


    UPLOAD_FILE(-201, "请添加要上传的文件"),
    UPLOAD_FILE_SUCCESS(202, "文件存储成功"),
    UPLOAD_ERROR(-203, "文件存储异常"),
    FILE_NULL(-204,"对不起您上传文件为空,请重试！！！"),
    GET_TOMCAT_PATH(-205,"获取tomcat路径异常"),

    ;


    private Integer status;
    private String message;


    ExceptionEnum() {
    }

    ExceptionEnum(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    @Override
    public String toString() {
        return "ExceptionEnum{" +
                "status=" + status +
                ", message='" + message + '\'' +
                '}';
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
